package org.urchr.beorganized.mobile.pages.secured.base;

import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.link.Link;
import org.urchr.beorganized.mobile.base.MobileSession;
import org.urchr.beorganized.mobile.base.components.link.MobileLink;
import org.urchr.beorganized.mobile.base.page.BasePage;
import org.urchr.beorganized.mobile.pages.login.LoginPage;

public class SecuredPage extends BasePage {

	public SecuredPage(PageParameters parameters) {
		super(parameters);
		add(new MobileLink("logout", "action/logout.png", new Link<String>("clink"){

			private static final long serialVersionUID = -180219492396660464L;
			
			@Override
			public void onClick() {
				MobileSession.getSession().setAuthorized(false);
				setResponsePage(LoginPage.class);
			}
		}, "Logout"));
	}
}
